package trans.model.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the attachment_category table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="attachment_category"
 */

public abstract class BaseAttachmentCategory  implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public static String REF = "AttachmentCategory";
	public static String PROP_STATUS = "Status";
	public static String PROP_CATE_TYPE = "CateType";
	public static String PROP_CATE_NAME = "CateName";
	public static String PROP_ID = "Id";
	public static String PROP_SHOW_TYPE = "ShowType";


	// constructors
	public BaseAttachmentCategory () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseAttachmentCategory (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.Integer cateType;
	private java.lang.String cateName;
	private java.lang.Integer showType;
	private java.lang.Integer status;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: cate_type
	 */
	public java.lang.Integer getCateType () {
		return cateType;
	}

	/**
	 * Set the value related to the column: cate_type
	 * @param cateType the cate_type value
	 */
	public void setCateType (java.lang.Integer cateType) {
		this.cateType = cateType;
	}



	/**
	 * Return the value associated with the column: cate_name
	 */
	public java.lang.String getCateName () {
		return cateName;
	}

	/**
	 * Set the value related to the column: cate_name
	 * @param cateName the cate_name value
	 */
	public void setCateName (java.lang.String cateName) {
		this.cateName = cateName;
	}



	/**
	 * Return the value associated with the column: show_type
	 */
	public java.lang.Integer getShowType () {
		return showType;
	}

	/**
	 * Set the value related to the column: show_type
	 * @param showType the show_type value
	 */
	public void setShowType (java.lang.Integer showType) {
		this.showType = showType;
	}



	/**
	 * Return the value associated with the column: status
	 */
	public java.lang.Integer getStatus () {
		return status;
	}

	/**
	 * Set the value related to the column: status
	 * @param status the status value
	 */
	public void setStatus (java.lang.Integer status) {
		this.status = status;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof trans.model.AttachmentCategory)) return false;
		else {
			trans.model.AttachmentCategory attachmentCategory = (trans.model.AttachmentCategory) obj;
			if (null == this.getId() || null == attachmentCategory.getId()) return false;
			else return (this.getId().equals(attachmentCategory.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}